home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
WWII Attack! from Pearl Harbor to Potsdam
/
WWII Attack - From Pearl Harbor to Potsdam - Disc 3.iso
/
mac
/
US
/
Shared.Cst
/
00034_Script_34
< prev
next >
Wrap
Text File
|
1999-11-23
|
1KB
|
57 lines
on PrintText textString
-- a Lingo script for printing an arbitrary quantity of text
-- using the PrintOMatic Xtra
-- PARAMETERS:
-- textString is a string value, the text you want to print
if the machineType = 256 then
put "arial" into printingFont
put "pmatic.dll" into XObjFile
else
put "helvetica" into printingFont
put "pmatic.xobj" into XObjFile
end if
openxlib XObjFile
put PrintOMatic(mnew) into printer
if not objectP(printer) then
-- something went wrong, the Xtra was not instantiated
Alert "There is no currently selected printer. Printing features are disabled."
else
-- register your Xtra here!
printer(mregister,"PMAT133-123-02039")
-- set the page margins
printer (mSetMargins,72,72,72,72)
put printer (mGetPageWidth) into w
put printer (mGetPageHeight) into h
printer (mSetTextFont,printingFont)
printer (mSetTextSize,10)
printer (mSetTextStyle,"normal")
-- set up our first page and text box
printer (mNewPage)
printer (mTextBox,0,0,w,h,false)
-- and place the appropriate text onto it
-- with the "autoAppend" parameter set to true
printer (mSetText, textString, true)
-- if printer (mDoJobSetup) = true then
-- updateStage
printer (mPrint)
printer(mDispose)
end if
-- close the PrintOMatic Xtra
closexlib XObjFile
end printText